import request from '@/utils/axiosRequest.js'

// 水票购买订单

// 所有处理中的订单
export function listTicketOrdersHandling(){
    return request({
        url: "/system/ticketOrder/handling",
        method: "get"
    })
}

// 分页查询所有订单
export function getTicketOrders(pageNo, pageSize){
    let url = "/system/ticketOrder/page?pageNo=";
    url = url + (pageNo ? pageNo : "");
    url = url + "&pageSize=" + (pageSize ? pageSize : "");
    return request({
        url: url,
        method: "get"
    })
}

// 完成订单
export function finishOrder(orderId) {
    return request({
        url: "/system/ticketOrder/finish/" + orderId,
        method: "put"
    })
}

// 取消订单
export function cancelOrder(orderId) {
    return request({
        url: "/system/ticketOrder/cancel/" + orderId,
        method: "put"
    })
}